package com.tms.ned.controlmonitor.decorators;

import com.tms.ned.controlmonitor.adapters.ComponentAdapter;

/*
 * Licensed under the Apache License, Version 2.0;<br> 
 * 
 * You may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
 * required by applicable law or agreed to in writing, software distributed under the License 
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and limitations under the License. 
 */

/**
 * ComponentDecorator describes a class that can decorate a Component in any way
 * it wants: Change the background color, the border, the text, ... anything. It
 * is used by ComponentAdapters that want to decorate a component based on its
 * dirty/invalid status etc.
 *
 * @author bshannon
 *
 */
public interface ComponentDecorator {

	/**
	 * Decorate the given component in any way the user sees fit. Feel free to
	 * examine the properties of the ComponentAdapter to decorate the component.
	 * If the "isDirty()" flag is true, feel free to change the foreground of
	 * the component to pink.. (for example... it's up to you!)
	 *
	 * @param componentAdapter
	 *            The component adapter that is adapting the component to decorate.
	 */
	public void decorateComponent(ComponentAdapter componentAdapter);

}
